var myapp = angular.module('myapp', [ 'ui.bootstrap' ]);
myapp.controller('login', [ '$scope', '$http', function($scope, $http) {
	$scope.phone = "";
	$scope.passwd = "";
	$scope.msg = "";
	$scope.singin = function() {
		$http({
			method : 'GET',
			url : ctx + '/login/signin.htm',
			params : {
				phone : $scope.phone,
				passwd : $scope.passwd
			}
		}).success(function(data) {
			if (data.rescode == 200) {
				console.log("登录成功");
				window.location.href = ctx+"/home/index.htm";
			} else {
				$scope.msg = data.msg;
			}
		});
	};
} ]);